package com.study.zzedu.ui.noticeinfodetail;

import android.content.Context;

import com.study.zzedu.base.BasePresenter;
import com.study.zzedu.base.BaseView;
import com.study.zzedu.http.OnResultListener;

public class NoticeInfoDetailPresenter extends BasePresenter<BaseView> {

    private NoticeInfoDetailModel nModel;
    public NoticeInfoDetailPresenter(){
        this.nModel = new NoticeInfoDetailModel();
    }

    public void getNoticeDetail(Context context,String id,String from){
        nModel.getNoticeDetail(context,id,from, new OnResultListener() {
            @Override
            public void onSuccess(String result) {
                getView().getData(result);
            }

            @Override
            public void onError(String error) {
                getView().showError(error);
            }
        });
    }
}
